#{extends 'common/base.html' /}
<!-- content start -->
<script>
	$(function() {
		$('#startClick').datepicker().on('changeDate.datepicker.amui',
				function(event) {
					$('#startDateStr').text($('#startClick').data('date'));
					$(this).datepicker('close');
				});
		$('#endClick').datepicker().on('changeDate.datepicker.amui',
				function(event) {
					$('#endDateStr').text($('#endClick').data('date'));
					$(this).datepicker('close');
				});
		$("#search_sub").click(function() {
			$("#startDate").val($("#startDateStr").html());
			$("#endDate").val($("#endDateStr").html());
			$("#myform").submit();
		})
	});
</script>
<div class="admin-content">
	<div class="am-cf am-padding">
		<div class="am-fl am-cf">
			<strong class="am-text-primary am-text-lg">刀具领用回收记录</strong> / <small>cutterUseRecord</small>
		</div>
	</div>
	<form class="am-form" id="myform" action="billIndex" method="post">
		<div class="am-g">
			<div class="am-u-sm-12 am-u-md-3" style="width: 50%;">
				<div class="am-form-group">
					<button type="button" class="am-btn am-btn-default am-margin-right"
						id="startClick">起始日期</button>
					<span id="startDateStr">${startDate}</span><input hidden
						name="startDate" id="startDate">
					&nbsp;&nbsp;&nbsp;-&nbsp;&nbsp;&nbsp; <span id="endDateStr">${endDate}</span><input
						hidden name="endDate" id="endDate"> &nbsp;&nbsp;&nbsp;
					<button type="button" class="am-btn am-btn-default am-margin-right"
						id="endClick">结束日期</button>
					<button class="am-btn am-btn-default" id="search_sub" type="button">搜索</button>
				</div>
			</div>
		</div>
	</form>
	<div class="am-g">
		<div class="am-u-sm-12">
			<table class="am-table am-table-striped am-table-hover table-main">
				<thead>
					<tr>
						<th class="table-check"><input type="checkbox" /></th>
						<th class="table-type">内部id</th>
						<th class="table-title">供应商名称</th>
						<th class="table-type">规格型号</th>
						<th class="table-author am-hide-sm-only">领用数量</th>
						<th class="table-author am-hide-sm-only">回收数量</th>
						<th class="table-date am-hide-sm-only">持有数量</th>
					</tr>
				</thead>
				<tbody>
					#{if json.data!=null} #{set count:1/} #{list
					items:json.data,as:'bean'}
					<tr>
						<td><input type="checkbox" /></td>
						<td>${bean?.material_id}</td>
						<td>${bean?.supp_name}</td>
						<td>${bean?.cutter_specs}</td>
						<td>${bean?.useNum}</td>
						<td>${bean?.recNum}</td>
						<td class="am-hide-sm-only">${bean?.useNum - bean?.recNum}</td>
					</tr>
					#{/list} #{/if}
				</tbody>
			</table>
		</div>
	</div>
</div>
<!-- content end -->